import Vue from 'vue'
import App from './App.vue'
import router from './router'
import 'vant/lib/index.css'
import Vant, {Toast} from "vant"
import 'bootstrap/dist/css/bootstrap.css'

import { Notify } from 'vant';
//codemirror
// import VueCodemirror from 'vue-codemirror'
// import 'codemirror/lib/codemirror.css'
// Vue.use(VueCodemirror)
Vue.config.productionTip = false
Vue.use(Vant)
// Vue.use(Notify)
Toast.setDefaultOptions({ duration: 500 });
Vue.use(Toast)

Vue.prototype.getUIR = function(img) {
  // 修改方法中的返回语句
  return "http://localhost:8848/ChallengeCup" + img;
};
Vue.prototype.getNum = function (num) {
  if(num > 1000){
    return num / 1000 + 'k'
  }else{
    return num
  }
};
Vue.prototype.onClickLeft = function (index){
  this.$router.push({name:'home', params:index})
};
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
